import request from '@/config/axios'

// 房租合同 VO
export interface RentContractImageVO {
  // 编号
  id: number
  // 合同关系表ID
  rentContractId: number
  // 合同地址
  imageUrl: string
}

// 房租合同 API
export const RentContractImageApi = {
  // 查询房租合同分页
  getRentContractImagePage: async (params: any) => {
    return await request.get({ url: `/zwsj/rent-contract-image/page`, params })
  },

  // 查询房租合同详情
  getRentContractImage: async (id: number) => {
    return await request.get({ url: `/zwsj/rent-contract-image/get?id=` + id })
  },

  // 新增房租合同
  createRentContractImage: async (data: RentContractImageVO) => {
    return await request.post({ url: `/zwsj/rent-contract-image/create`, data })
  },

  // 修改房租合同
  updateRentContractImage: async (data: RentContractImageVO) => {
    return await request.put({ url: `/zwsj/rent-contract-image/update`, data })
  },

  // 删除房租合同
  deleteRentContractImage: async (id: number) => {
    return await request.delete({ url: `/zwsj/rent-contract-image/delete?id=` + id })
  },

  // 导出房租合同 Excel
  exportRentContractImage: async (params) => {
    return await request.download({ url: `/zwsj/rent-contract-image/export-excel`, params })
  },
}